1. Field of the Invention
The present invention relates to an image processing apparatus, and specifically relates to an image processing apparatus that applies image processing to a viewing image using depth information.
2. Description of the Related Art
In recent years, an imaging apparatus has been developed that is capable of simultaneously acquiring a viewing image and a depth map representing a depth to a scene being photographed. As a system for acquiring the depth map, there are a plurality of systems. For example, there is a stereo system for acquiring images from a plurality of visual point positions and calculating a depth on the basis of the principle of triangulation using a parallax calculated from a correspondence relation among pixels in the images. There are also a depth from defocus (DFD) system and a depth from focus (DFF) system for analyzing blurring states of a plurality of images acquired under shooting conditions in which blurring states are different such as focus positions and stops and calculating a depth. Further, there is a time of flight (TOF) system for calculating a depth on the basis of light velocity and time from when light is emitted from a light source until the light reaches a sensor after being reflected on an object.
There is a technique for generating, using a viewing image and a depth map, an image capable of representing, even in a digital camera including a small aperture lens, a shallow depth of field in a digital camera including a large aperture lens (e.g., Patent Literature 1). An image processing apparatus disclosed in Patent Literature 1 is briefly explained. The image processing apparatus includes an imaging system configured to photograph a viewing image and a three-dimensional measuring unit configured to acquire a depth map representing a depth of a photographing scene. First, the image processing apparatus acquires the viewing image and the depth map from the imaging system and the three-dimensional measuring unit. Subsequently, the image processing apparatus generates a parameter concerning a point image distribution of a blur using the depth map. The image processing apparatus applies filter processing having a low-pass characteristic to the viewing image using the parameter to generate an image having a stereoscopic effect with a reduce depth of field. Contrary to applying blurring processing, it is also possible to apply image restoration processing using a filter having a characteristic opposite to the point image distribution corresponding to a depth. This makes it possible to realize image restoration corresponding to the depth and acquire a higher definition image.
On the other hand, there has been disclosed an image processing method of representing a depth of field like a depth of field of an image photographed by an actual camera using three-dimensional computer graphics (3DCG) (e.g., Patent Literature 2). Specifically, a depth from an imaginary camera is calculated in a 3DCG scene, the depth is divided into a plurality of zones of depths, and a blurring amount is determined from a depth representing the zones. Subsequently, blurring processing is applied to the zones with the calculated blurring amount to generate a 3DCG image that reproduces a shallow depth of field like a depth of field of an image photographed by the actual camera. Such a method can also be applied when image restoration is performed. Therefore, it is possible to realize an increase in speed.    Patent Literature 1: Japanese Patent Application Laid-Open No. H07-21365    Patent Literature 2: Japanese Patent Application Laid-Open No. 2011-41089